//赛程相关 首页
import request from '../utils/request.js'

// 获取赛程列表
const getScheduleList = (data, showOnload = true) =>{
  return request({
    url: '/api/auth/schedule/list',
    method: 'POST',
    data,
    showOnload
  })
}
//分类列表【4.13】
const getcategory = (data,showOnload = true) =>{
  return request({
    url: '/api/auth/category/list',
    method: 'POST',
    data,
    showOnload
  })
}
//分类列表【4.13】
const getMatchList = (data,showOnload = true) =>{
  return request({
    url: '/api/auth/match/list',
    method: 'POST',
    data,
    showOnload
  })
}
// 添加赛程
const getScheduleAdd = data => {
  return request({
    url: '/api/auth/schedule/add',
    method: 'POST',
    data
  })
}

// 获取赛程详情
const getScheduleDetail = id => {
  return request({
    url: '/api/auth/schedule/get/' + id,
    method: 'POST'
  })
}

// 删除赛程
const getScheduleDel = id => {
  return request({
    url: '/api/auth/schedule/deleted/' + id,
    method: 'POST'
  })
}


// 通过证件号查询参加的活动
const getScheduleJoinDetail = data => {
  return request({
    url: '/api/auth/userOrder/joinList',
    method: 'POST',
    data
  })
}

module.exports = {
  getScheduleList,
  getScheduleAdd,
  getScheduleDetail,
  getScheduleDel,
  getcategory,
  getMatchList,
  getScheduleJoinDetail
}